/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entityBeans;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author allankv
 */
@Entity
@Table(name = "taxonconcept")
@NamedQueries({
    @NamedQuery(name = "Taxonconcept.findAll", query = "SELECT t FROM Taxonconcept t"),
    @NamedQuery(name = "Taxonconcept.findByIdtaxonconcept", query = "SELECT t FROM Taxonconcept t WHERE t.idtaxonconcept = :idtaxonconcept"),
    @NamedQuery(name = "Taxonconcept.findByTaxonconcept", query = "SELECT t FROM Taxonconcept t WHERE t.taxonconcept = :taxonconcept")})
public class Taxonconcept implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idtaxonconcept")
    private Integer idtaxonconcept;
    @Column(name = "taxonconcept")
    private String taxonconcept;
    @OneToMany(mappedBy = "taxonconcept", fetch = FetchType.LAZY)
    private List<Taxonomicelement> taxonomicelementList;

    public Taxonconcept() {
    }

    public Taxonconcept(Integer idtaxonconcept) {
        this.idtaxonconcept = idtaxonconcept;
    }

    public Taxonconcept(Integer idtaxonconcept, String taxonconcept) {
        this.idtaxonconcept = idtaxonconcept;
        this.taxonconcept = taxonconcept;
    }

    public Integer getIdtaxonconcept() {
        return idtaxonconcept;
    }

    public void setIdtaxonconcept(Integer idtaxonconcept) {
        this.idtaxonconcept = idtaxonconcept;
    }

    public String getTaxonconcept() {
        return taxonconcept;
    }

    public void setTaxonconcept(String taxonconcept) {
        this.taxonconcept = taxonconcept;
    }

    public List<Taxonomicelement> getTaxonomicelementList() {
        return taxonomicelementList;
    }

    public void setTaxonomicelementList(List<Taxonomicelement> taxonomicelementList) {
        this.taxonomicelementList = taxonomicelementList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idtaxonconcept != null ? idtaxonconcept.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Taxonconcept)) {
            return false;
        }
        Taxonconcept other = (Taxonconcept) object;
        if ((this.idtaxonconcept == null && other.idtaxonconcept != null) || (this.idtaxonconcept != null && !this.idtaxonconcept.equals(other.idtaxonconcept))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityBeans.Taxonconcept[idtaxonconcept=" + idtaxonconcept + "]";
    }

}
